#include <iostream>

using std::cout;
using std::endl;

class Example
{
public:
    Example(int value)
    /* : _iy(value)//数据成员的初始化顺序，只与其声明的顺序相关 */
    /* , _ix(_iy)//与在初始化列表中的顺序没有任何关系 */
    : _ix(_iy)
    , _iy(value)
    {
        cout << "Example(int)" << endl;
    }

    void print()
    {
        cout << "_ix = " << _ix << endl
             << "_iy = " << _iy << endl;
    }
private:
    int _ix;
    int _iy;
};

int main(int argc, char *argv[])
{
    Example ex(10);
    ex.print();
    return 0;
}

